package com.example.demo.app;

/**
 * @author hanbaoyu
 */

public enum ResponseEnum {

    OK(0, "ok"),

    AUTH_ERROR(401, "请登录或退出重新登录"),

    ERROR(500, "用户错误"),

    // 需要记日志报警
    ERROR_G(ERROR.getCode(), ERROR.getMessage()),

    UNKNOWN_ERROR(501, "服务器发生未知错误");

    private Integer code;

    ResponseEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    private String message;
}
